Hello,
I appreciate the help but I am still unable to get this to work.
My exact XML string is (being writtin to the screen code using
responce.write):
<?xml version="1.0" encoding="UTF-8"?>
<SSOUser><Status>FAIL</Status><Message>Unable to find session id of
1137018716939</Message></SSOUser>
The IsNothing() code does not work for me, I get a "Type Mismatch" error on
this.
But if I take out that check and just try to write the Node.text to the
screen it still does not work. I would appareciate your help some more in
this.
My exact code I am using (minus the URL where I am getting the XML data from
(cant post as security reasons)) is below between the 2 lines.
__________________________________________________ ______________
Set xml = Server.CreateObject("Msxml2.XMLHTTP.3.0")
xml.Open "GET", "URL HERE", False,"ID","PW"
xml.Send
Dim xmlData
xmlData = xml.responseText
%>
<br>
<%Response.Write xmlData %>
<br><br>
<%
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.loadXML(xmlData)
set node = nothing
set node = xml.selectSingleNode("/SSOUser/Status")
if IsNothing(node) then
'if isblank(node) then
response.Write("NOT FOUND")
else
response.write(node.text)
end if
__________________________________________________ ______________
"Bob Barrows [MVP]" wrote:
Bob Barrows [MVP] wrote: A more error-proof way of doing this is:
set node = xml.selectSingleNode("/SSOUser/Status")
if isnothing(node) then
response.write "Could not find ""/SSOUser/Status"""
else
response.write node.text
end if
Actually, this will work better:
set node = nothing
set node = xml.selectSingleNode("/SSOUser/Status")
if isnothing(node) then
response.write "Could not find ""/SSOUser/Status"""
else
response.write node.text
end if
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.